package com.itheima.home_work.math_topic;

public class SubtractTest extends MathTest {
    public SubtractTest() {
        super();
        this.type = 1;
        this.tipTxt = "减数";
    }

    public SubtractTest(int a, int b) {
        super(a, b);
        this.type = 1;
        this.tipTxt = "减数";
    }

    @Override
    public int calculate() {
        return this.getA() - this.getB();
    }

    @Override
    public String getQuestion() {
        return this.getA() + " - " + this.getB() + " = ?";
    }
}
